<?php

/**
 * Created by PhpStorm.
 * User: YUWENXUAN
 * Date: 2017/4/7
 * Time: 16:21
 */
class people
{
    protected $tour = 0;

    /**
     * @return int
     */
    public function getTour(): int
    {
        return $this->tour;
    }

    /**
     * @param int $tour
     */
    public function setTour(int $tour)
    {
        $this->tour = $tour;
    }

    /**
     * type hint
     * @param ITrafic $trafic_way
     * @return float|int
     */
    public function travel(ITrafic $trafic_way)
    {
        $time = $this->tour / $trafic_way->getSpeed();

        return $time;

    }

}